#pragma once

#include "Synonym.h"
/* ------------------------------------------------------------------------------------------
* A singleton class that takes in a QueryType:
*	QueryType: Modifies, Uses, Follows or Parent
* and a list of Synonym:
*	Synonym: Assignment, Procedure, Procedure Literal, Statement, Variable Literal or While
* and returns a Query object.
*
* Since patterns take in 3 variables instead of 2 (unlike modifies etc), a constructor is
* overloaded to handle pattern queries.
* 
* Example: Creating a Modifies query (Modifies(1,"a"))
* QueryCreator *queryCreator = QueryCreator::getQueryCreator();
* 
* QueryType queryType = MODIFIES;
* VAR_TYPE type1 = ASSIGN;
* VAR_TYPE type2 = STATEMENT;
* Synonym *assignType = new Synonym(type1, "a");
* Synonym *statementType = new Synonym(type2, "1");
*
* Query *mod = queryCreator->createQuery(queryType, statementNumber, varLiteral);
*
* End Example
*
* The Query object can then be passed over to QueryEvaluator for processing.
* ------------------------------------------------------------------------------------------- */


class Result {
private:
	VAR_TYPE type; /**< The type of the result of enum VAR_TYPE */
	std::string variable; /**< The string form of the result */

public:
	/** Constructor
	 * Constructs a result of a certain synonym type with a string identifier
	 * @param varType variable type
	 * @param var variable
	 */
	Result(VAR_TYPE varType, std::string var);

	/** 
	 * Gets the type of the result
	 * @return the type of result
	 */
	VAR_TYPE getVarType();

	/** 
	 * Gets the string identifier of the result
	 * @return the string identifier
	 */
	std::string getVariable();
};